﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Diagnostics;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity.ModelConfiguration;
using System.Reflection;
using System.ComponentModel.DataAnnotations;

namespace BugTracker.Models
{
    public class Project
    {
        [Key]
        public int project_idPK { get; set; }
        [Column]
        public int assign_idFK { get; set; }
        public int user_idFK { get; set; }
        [Required(ErrorMessage = "Project Name is Required")]
        public string project_name { get; set; }
        //[DisplayFormat(DataFormatString = "{0:d}")]
        //[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public string project_datecreated { get; set; }
        //[DisplayFormat(DataFormatString = "{0:d}")]

        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        [Required(ErrorMessage = "Project Deadline is required")]
        public DateTime project_deadline { get; set; }
        [Required(ErrorMessage = "Project Description is required")]
        public string project_description { get; set; }
        public string task_assign { get; set; }
        public int issue_idFK { get; set; }
        public int status_id { get; set; }
        public int developer_assignID { get; set; }
        public int qa_assignID { get; set; }
    }

    public class AnonymousType
    {
        [Key]
        public int project_idPK { get; set; }
        [Column]
        public int assign_idFK { get; set; }
        public int user_idFK { get; set; }
        public string project_name { get; set; }
        [DisplayFormat(DataFormatString = "{0:d}")]
        public DateTime project_datecreated { get; set; }
        [DisplayFormat(DataFormatString = "{0:d}")]
        public DateTime project_deadline { get; set; }
        public string project_description { get; set; }
        public string task_assign { get; set; }
        public int issue_idFK { get; set; }
        public int status_id { get; set; }
        public string status_name { get; set; }


    }

    //public class ProjectItem
    //{
    //    public int project_idPK { get; set; }
    //    public int assign_idFK { get; set; }
    //    public int user_idFK { get; set; }
    //    public string project_name { get; set; }
    //    public DateTime project_datecreated { get; set; }
    //    public DateTime project_deadline { get; set; }
    //    public string project_description { get; set; }
    //    public string task_assign { get; set; }
    //    public int issue_idFK { get; set; }
    //}
}